Fix for VCPU periodic timer.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Sep 2008 10:02:57 +0000 (11:02 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Sep 2008 10:02:57 +0000 (11:02 +0100)
commit04250df04652b746cf77e87aa52e4048d06e4062
treec1323727aaf3a4e21ae67c839b7f3c649d453091
parent87fd15ceee9c195f428f9e329b1c223bd17b275b
Fix for VCPU periodic timer.

Idle vcpu periodic timer is useless. It increased the lapic timer
interrupt number, which decreased the cpu idle residency. This patch
disables idle vcpu periodic timer via keeping v->periodic_period = 0.

The vcpu periodic timer may be expired 50us before expected time
because there is a 50us TIMER_SLOP used for soft timer (xen/common/timer.c,
timer_softirq_action()). This will cause vcpu_periodic_timer_work() be
continuously called tens of times in a single call of
timer_softirq_action() until (now > periodic_next_event). It brings
unnecessary overhead. This patch adds a similar time slop in vcpu
periodic timer to eliminate this overhead.

Signed-off-by: Wei Gang <gang.wei@intel.com>
xen/arch/x86/domain.c
xen/common/schedule.c